// Fill out your copyright notice in the Description page of Project Settings.

#include "Isalong2.h"
#include "BulletDecalBase.h"


// Sets default values
ABulletDecalBase::ABulletDecalBase()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	_decalBox = CreateDefaultSubobject<UDecalComponent>(TEXT("BulletDecal"));
	_decalBox->SetActive(true);
	_decalBox->SetRelativeScale3D(FVector(10, 10, 10));
	_decalBox->SetRelativeRotation(FRotator(180,0 ,0 ));
	RootComponent = _decalBox;

	InitialLifeSpan = 60.0f;
}

// Called when the game starts or when spawned
void ABulletDecalBase::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void ABulletDecalBase::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );

}

void ABulletDecalBase::SetMat(UMaterial* mat)
{
	_decalBox->SetDecalMaterial(mat);
}

